package com.car.carmgr.mapper;

import com.car.carmgr.bean.BaseStat;
import com.car.carmgr.bean.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface CustomerMapper {

    int insertCustomer(Customer customer);

    int deleteCustomerById(Integer customerId);

    int updateCustomer(Customer customer);

    int findCustomerById(@Param("identity") String identity);
    /**
     * 查询用户
     */
    List<Customer> findCustomerByWhere(@Param("identity") String identity, @Param("customerName") String customerName, @Param("sex") Integer sex, @Param("address") String address, @Param("phone") String phone, @Param("career") String career,@Param("createTime") Date createTime);

    Integer getCountByWhere(@Param("identity") String identity, @Param("customerName") String customerName, @Param("sex") Integer sex, @Param("address") String address, @Param("phone") String phone, @Param("career") String career,@Param("createTime") Date createTime);

    //数据表
    List<BaseStat> getCountByAddress();

}
